package com.idak.rdv.db;

// Generated 15 juin 2012 23:31:31 by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Appointment generated by hbm2java
 */
@SuppressWarnings("serial")
@Entity
@Table(name = "APPOINTMENT", catalog = "rdv")
public class Appointment implements java.io.Serializable {

	private Integer appointmentId;
	private Patient patient;
	private Doctor doctor;
	private Date dtAppointment;
	private String beginHour;
	private String beginMinute;
	private String endHour;
	private String endMinute;
	private Date dtCreate;
	private Date dtModif;
	private Date dtEnd;

	public Appointment() {
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "APPOINTMENT_ID", unique = true, nullable = false)
	public Integer getAppointmentId() {
		return this.appointmentId;
	}

	public void setAppointmentId(Integer appointmentId) {
		this.appointmentId = appointmentId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "PATIENT_ID", nullable = false)
	public Patient getPatient() {
		return this.patient;
	}

	public void setPatient(Patient patient) {
		this.patient = patient;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "DOCTOR_ID", nullable = false)
	public Doctor getDoctor() {
		return this.doctor;
	}

	public void setDoctor(Doctor doctor) {
		this.doctor = doctor;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "DT_APPOINTMENT", nullable = false, length = HibernateConstant.LENGTH.DATE)
	public Date getDtAppointment() {
		return this.dtAppointment;
	}

	public void setDtAppointment(Date dtAppointment) {
		this.dtAppointment = dtAppointment;
	}

	@Column(name = "BEGIN_HOUR", nullable = false, length = HibernateConstant.LENGTH.HOUR)
	public String getBeginHour() {
		return this.beginHour;
	}

	public void setBeginHour(String beginHour) {
		this.beginHour = beginHour;
	}

	@Column(name = "BEGIN_MINUTE", nullable = false, length = HibernateConstant.LENGTH.MINUTE)
	public String getBeginMinute() {
		return this.beginMinute;
	}

	public void setBeginMinute(String beginMinute) {
		this.beginMinute = beginMinute;
	}

	@Column(name = "END_HOUR", nullable = false, length = HibernateConstant.LENGTH.HOUR)
	public String getEndHour() {
		return this.endHour;
	}

	public void setEndHour(String endHour) {
		this.endHour = endHour;
	}

	@Column(name = "END_MINUTE", nullable = false, length = HibernateConstant.LENGTH.MINUTE)
	public String getEndMinute() {
		return this.endMinute;
	}

	public void setEndMinute(String endMinute) {
		this.endMinute = endMinute;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "DT_CREATE", nullable = false, length = HibernateConstant.LENGTH.DATETIME)
	public Date getDtCreate() {
		return this.dtCreate;
	}

	public void setDtCreate(Date dtCreate) {
		this.dtCreate = dtCreate;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "DT_MODIF", length = HibernateConstant.LENGTH.DATETIME)
	public Date getDtModif() {
		return this.dtModif;
	}

	public void setDtModif(Date dtModif) {
		this.dtModif = dtModif;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "DT_END", length = HibernateConstant.LENGTH.DATETIME)
	public Date getDtEnd() {
		return this.dtEnd;
	}

	public void setDtEnd(Date dtEnd) {
		this.dtEnd = dtEnd;
	}

}
